{layout name="../common/master"/}
<div id="right">
  <h4>
      <div class="btn-group">
          <a href="{$_SERVER['HTTP_REFERER']}" class="btn btn-success">返回</a>
      </div>
  </h4>
    <div class="panel panel-default col-lg-10">
        <div class="panel-heading">
            <h3 class="panel-title">个人认证
                <!--{if condition="isset($userCerInfo['valid']) AND ($userCerInfo['valid'] eq 'approved')"}<button type="button" uid="{$userCerInfo['id']}" phone="{$userCerInfo['phoneNumber']}" id="cerInvalid" class="btn btn-danger"> 无效 </button>{/if} {if condition="isset($userCerInfo['valid']) AND ($userCerInfo['valid'] eq 'rejected')"}<button type="button" uid="{$userCerInfo['id']}" phone="{$userCerInfo['phoneNumber']}" id="sendSms" class="btn btn-danger"> 发送短信推送 </button>{/if}-->
            </h3>
        </div>

        <div class="panel-body">
            <table class="table table-hover table-bordered">
                <tbody>
                {if condition="empty($userCerInfo)"}
                暂无认证
                {else /}
                <tr>
                    <th>id</th>
                    <td>{$userCerInfo['id']}</td>
                </tr>
                <tr>
                    <th>firstname</th>
                    <td>{$userCerInfo['firstname']}</td>
                </tr>
                <tr>
                    <th>middlename</th>
                    <td>{$userCerInfo['middlename']}</td>
                </tr>
                <tr>
                    <th>lastname</th>
                    <td>{$userCerInfo['lastname']}</td>
                </tr>

                <tr>
                    <th>电话</th>
                    <td>{$userCerInfo['phoneNumber']}</td>
                </tr>
                <tr>
                    <th>邮箱</th>
                    <td>{$userCerInfo['email']}</td>
                </tr>
                <tr>
                    <th>aadhaarNum</th>
                    <td>{$userCerInfo['aadhaar_num']}</td>
                </tr>


                <tr>
                    <th>aadhaar正面</th>
                    <td>
                        <img src="{$userCerInfo['cardfrontUrl']}" alt="">
                    </td>
                </tr>
                <tr>
                    <th>aadhaar反面</th>
                    <td>
                        <img src="{$userCerInfo['cardbackUrl']}" alt="">
                    </td>
                </tr>
                <tr>
                    <th>验证时间</th>
                    <td>{$userCerInfo['valid_time']}</td>
                </tr>
                <tr>
                    <th>状态</th>
                    <td>{$userCerInfo['valid']}</td>
                </tr>
                <tr>
                    <th>验证状态</th>
                    <td>{$userCerInfo['valid_status']}</td>
                </tr>
                <tr>
                    <th>创建时间</th>
                    <td>{$userCerInfo['createdAt']}</td>
                </tr>
                {/if}
                </tbody>
            </table>
        </div>
        <div class="panel-heading">
            <h3 class="panel-title">个人信息</h3>
        </div>
        <div class="panel-body">
            <table class="table table-hover table-bordered">
                <tbody>
                {if condition="empty($personInfo)"}
                暂无认证
                {else /}
                <tr>
                    <th>id</th>
                    <td>{$personInfo['id']}</td>
                </tr>
                <tr>
                    <th>电话</th>
                    <td>{$personInfo['user_phone']}</td>
                </tr>
                <tr>
                    <th>birthDay</th>
                    <td>{$personInfo['birthDay']}</td>
                </tr>
                <tr>
                    <th>currentState</th>
                    <td>{$personInfo['currentState']}</td>
                </tr>
                <tr>
                    <th>currentCity</th>
                    <td>{$personInfo['currentCity']}</td>
                </tr>
                <tr>
                    <th>currentPinCode</th>
                    <td>{$personInfo['currentPinCode']}</td>
                </tr>
                <tr>
                    <th>currentAddress</th>
                    <td>{$personInfo['currentAddress']}</td>
                </tr>
                <tr>
                    <th>permanentState</th>
                    <td>{$personInfo['permanentState']}</td>
                </tr>

                <tr>
                    <th>permanentCity</th>
                    <td>{$personInfo['permanentCity']}</td>
                </tr>
                <tr>
                    <th>permanentaAddress</th>
                    <td>{$personInfo['permanentaAddress']}</td>
                </tr>
                <tr>
                    <th>permanentaPinCode</th>
                    <td>{$personInfo['permanentaPinCode']}</td>
                </tr>
                <tr>
                    <th>genderinfo</th>
                    <td>{$personInfo['genderinfo']}</td>
                </tr>
                <tr>
                    <th>panID</th>
                    <td>{$personInfo['panID']}</td>
                </tr>
                <tr>
                    <th>create_time</th>
                    <td>{$personInfo['create_time']}</td>
                </tr>
                {/if}
                </tbody>
            </table>
        </div>
        <div class="panel-heading">
            <h3 class="panel-title">公司认证
                <!--{if condition="isset($companyCerInfo['valid']) AND ($companyCerInfo['valid'] eq 'approved')"}<button type="button" id="comInvalid" phone="{$companyCerInfo['userPhone']}" uid="{$companyCerInfo['id']}" class="btn btn-danger"> 无效 </button>{/if}  {if condition="isset($companyCerInfo['valid']) AND ($companyCerInfo['valid'] eq 'rejected')"}<button type="button" phone="{$companyCerInfo['userPhone']}" uid="{$companyCerInfo['id']}" id="sendSms2" class="btn btn-danger"> 发送短信推送 </button>{/if}-->
            </h3>
        </div>
        <div class="panel-body">
            <table class="table table-hover table-bordered">
                <tbody>
                {if condition="empty($companyCerInfo)"}
                暂无认证
                {else /}
                <tr>
                    <th>id</th>
                    <td>{$companyCerInfo['id']}</td>
                </tr>
                <tr>
                    <th>公司名称</th>
                    <td>{$companyCerInfo['companyName']}</td>
                </tr>
                <tr>
                    <th>公司邮箱</th>
                    <td>{$companyCerInfo['companyEmail']}</td>
                </tr>
                <tr>
                    <th>薪资水平</th>
                    <td>{$companyCerInfo['salaryRange']}</td>
                </tr>
                <tr>
                    <th>公司联系方式</th>
                    <td>{$companyCerInfo['companyContact']}</td>
                </tr>
                <tr>
                    <th>职位</th>
                    <td>{$companyCerInfo['titleRank']}</td>
                </tr>
                <tr>
                    <th>confirmAdmin</th>
                    <td>{$companyCerInfo['confirmAdmin']}</td>
                </tr>
                <tr>
                    <th>confirmPhone</th>
                    <td>{$companyCerInfo['confirmPhone']}</td>
                </tr>
                <tr>
                    <th>用户电话</th>
                    <td>{$companyCerInfo['userPhone']}</td>
                </tr>
                <tr>
                    <th>认证状态</th>
                    <td>{$companyCerInfo['valid_status']}</td>
                </tr>
                <tr>
                    <th>认证时间</th>
                    <td>{$companyCerInfo['validTime']}</td>
                </tr>
                <tr>
                    <th>有效状态</th>
                    <td>{$companyCerInfo['valid']}</td>
                </tr>
                {/if}
                </tbody>
            </table>
        </div>

        <div class="panel-heading">
            <h3 class="panel-title">银行卡信息 </h3>
        </div>
        <div class="panel-body">
            <table class="table table-hover table-bordered">
                <tbody>
                {if condition="empty($userAccount)"}
                暂无信息
                {else /}
                <tr>
                    <th>id</th>
                    <td>{$userAccount['id']}</td>
                </tr>
                <tr>
                    <th>用户ID</th>
                    <td>{$userAccount['user_id']}</td>
                </tr>
                <tr>
                    <th>银行名称</th>
                    <td>{$userAccount['card_type']}</td>
                </tr>
                <tr>
                    <th>银行卡号</th>
                    <td>{$userAccount['ptm_card']}</td>
                </tr>
                <tr>
                    <th>IFSC</th>
                    <td>{$userAccount['nbfc_num']}</td>
                </tr>

                <tr>
                    <th>绑卡时间</th>
                    <td>{$userAccount['update_time']}</td>
                </tr>
                {/if}
                </tbody>
            </table>
        </div>

        {if condition="!empty($useraccountList)"}
        <div class="panel-heading" style="color: red">
            <h3 class="panel-title">历史银行卡信息</h3>
        </div>
        {foreach name="useraccountList" item="vo" key="k"}
        <div class="panel-body" style="color: red">
            <table class="table table-hover table-bordered">
                <tbody>
                <tr>
                    <th>id</th>
                    <td>{$vo['id']}</td>
                </tr>
                <tr>
                    <th>用户ID</th>
                    <td>{$vo['user_id']}</td>
                </tr>
                <tr>
                    <th>银行名称</th>
                    <td>{$vo['card_type']}</td>
                </tr>
                <tr>
                    <th>银行卡号</th>
                    <td>{$vo['ptm_card']}</td>
                </tr>
                <tr>
                    <th>IFSC</th>
                    <td>{$vo['nbfc_num']}</td>
                </tr>

                <tr>
                    <th>绑卡时间</th>
                    <td>{$vo['update_time']}</td>
                </tr>

                </tbody>
            </table>
        </div>
        {/foreach}
        {/if}
    </div>
    </div>

</div>
<script>
    $("#cerInvalid").click(function(){
        var uid=$(this).attr('uid');
        var phone=$(this).attr('phone');
        $.post("{:URL('home/User/updateUsercer')}",{uid:uid,phone:phone}, function (res) {
           if(res.code == 0){
               layer.alert("success");
               location.reload();
           }else{
               layer.alert(res.data);
               location.reload();
           }
        })
    })
    $("#comInvalid").click(function(){
        var uid=$(this).attr('uid');
        var phone=$(this).attr('phone');
        $.post("{:URL('home/User/updateComcer')}",{uid:uid,phone:phone}, function (res) {
            if(res.code == 0){
                layer.alert("success");
                location.reload();
            }else{
                layer.alert(res.data);
                location.reload();
            }
        })
    })
    $("#sendSms").click(function () {
        var phone=$(this).attr('phone');
        $.post("{:URL('home/User/sendSms')}",{phone:phone}, function (res) {
            if(res.code == 0){
                layer.alert("success");
                location.reload();
            }else{
                layer.alert(res.data);
                location.reload();
            }
        })
    })
    $("#sendSms2").click(function () {
        var phone=$(this).attr('phone');
        $.post("{:URL('home/User/sendSms')}",{phone:phone}, function (res) {
            if(res.code == 0){
                layer.alert("success");
                location.reload();
            }else{
                layer.alert(res.data);
                location.reload();
            }
        })
    })

</script>